import request from '@/api/request.js'

// 表格数据
export const getAddContent = (params) => {
    return request({
        url: '/content/v_add',
        method: 'GET',
        params
    })
}

// 富文本上传图片
export const uploadImageFn = (data) => {
    return request({
        url: 'content/profileImage',
        method: 'POST',
        data
    })
}
// 富文本回显图片
export const showImageFn = (path) => {
    return request({
        url: `/content/getProfileImage?img_path=${path}`,
        method: 'GET'
    })
}

// 保存内容
export const saveContent = (data) => {
    return request({
        url: '/content/o_save',
        method: 'POST',
        data
    })
}

// 保存内容
export const saveSecondContent = (params) => {
    return request({
        url: '/content/o_save_second',
        method: 'POST',
        params
    })
}

// 修改内容
export const updateContent = (data) => {
    return request({
        url: '/content/updateContent',
        method: 'POST',
        data
    })
}
